<?php declare(strict_types=1);

use Hyperf\HttpServer\Router\Router;

use  App\Api\Controller\HomeController;
use  App\Api\Controller\PaymentController;

/* 不需要通过中间件验证的路由 */

// 微信支付回调事件
Router::post(\App\Api\Constants\Business::WX_PAY_NOTIFY_URL, [PaymentController::class, 'wxNotify']);
// 支付宝支付回调事件
Router::post(\App\Api\Constants\Business::AL_PAY_NOTIFY_URL, [PaymentController::class, 'aliNotify']);

// 需要通过中间件验证的路由
Router::addGroup('', function () {

//     发送短信验证码
    Router::get('/send_sms', [HomeController::class, 'sendSms']);

    // 图片上传
//    Router::post('/upload/image', [HomeController::class, 'uploadImage']);

}, [
    'middleware' => [
        App\Api\Middleware\BasicMiddleware::class,
        App\Api\Middleware\AuthorizationMiddleware::class
    ]
]);